﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace demo07_Font与Text
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Form2 f = new Form2();
            f.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Font f = new Font(SystemFonts.DefaultFont, FontStyle.Regular);   //系统默认字体, 及常规字体样式
            //Font f = new Font("宋体",12);   //字体与大小
            Font f = new Font("宋体", 24, GraphicsUnit.Pixel);   //宋体,大小,单位
            Graphics g = this.CreateGraphics();
            g.DrawString("欢迎关注 AI先锋 AutoWorkAI !", f, Brushes.Red, 120, 100);
            g.Dispose();
        }
    }
}
